﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace Love.Awesome.TMX
{
    public enum PropertyTypeEnum
    {
        [XmlEnum("default")]
        Default
    }

    [XmlType("type")]
    public enum PropertyValueTypeEnum
    {
        [XmlEnum("string")]
        String,

        [XmlEnum("int")]
        Int,

        [XmlEnum("float")]
        Float,

        [XmlEnum("bool")]
        Bool,

        [XmlEnum("file")]
        File,

        [XmlEnum("color")]
        Color,
        
        [XmlEnum("object")]
        Object,

        [XmlEnum("class")]
        Class,
    }

    [XmlType("property")]
    public class Property
    {
        [XmlAttribute("name")]
        public string Name;

        [XmlAttribute("type")]
        public PropertyValueTypeEnum Type;

        [XmlAttribute("propertytype")]
        public PropertyTypeEnum PropertyType;

        [XmlAttribute("value")]
        public string Value;

        [XmlElement("Properties")]
        public Properties Properties;
    }
}
